<template>
	<view>
		<!--<u-navbar :is-fixed="false" :border-bottom="false" :is-back="true" back-icon-name="arrow-leftward"
			back-icon-color="#fff" back-icon-size="35" :title="title" :background="{ background: '#083058' }"
			title-color="#fff">
		</u-navbar>-->
		<swiper style="height:100vh;">
			<swiper-item v-for="(item, index) in videos" :key="index">
				<video-player :video="item" :index="index" />
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	import VideoPlayer from './video-player.vue';
	export default {
		components: {
			'video-player': VideoPlayer
		},
		props: {
			list: {
				type: Array,
				default: () => []
			}
		},
		watch: {
			list() {
				this.videos = this.list;
			}
		},
		data() {
			return {
				videos: [],
				title: '视频查看'
			}
		},
		onLoad(params) {
			if (params) {
				this.title = '[' + params.deviceName + ']视频查看';
				this.videos.push({
					url: decodeURIComponent(params.url) + '&deviceSerial=' + params.deviceSerial + '&channelNo=' + params.channelNo
				})
			}
		},
		onReady: function (res) {
		},
		methods: {
		}
	}
</script>

<style scoped lang="scss">
	.video-list {
		width: 100%;
		height: 100%;
		z-index: 19;
	}
</style>
